<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Grom Hellscream
 * Date: 11/2/12
 * Time: 11:33 AM
 * To change this template use File | Settings | File Templates.
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$hosocanbos = $this->get('vehuu');
$nam = JRequest::getInt('nam', 60);
$nu = JRequest::getInt('nu', 55);
if (!JFactory::getUser()->authorise('vast.baocao.manage'))
{
    JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_vast&view=vast'));        
}

?>
<div id="crumbs">
    <div style="color: #222222;font-weight: normal;margin: 0;padding: 0">
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=vast') ?>">Trang chủ</a> »
        <span>Báo cáo cán bộ về hưu</span>
    </div>
</div>

<div id="main" class="home">
    <h3 class="title green">Tạo báo cáo danh sách cán bộ về hưu của viện</h3>

    <div class="single">
        <table id="rounded-corner">
            <thead>
                <tr>
                    <th scope="col" class="rounded-company"><a href="#hoten">Họ tên</a></th>
                    <th scope="col" class="rounded-q1"><a href="#ngaysinh">Ngày sinh</a></th>
                    <th scope="col" class="rounded-q2"><a href="#nguyenquan">Quê quán</a></th>
                    <th scope="col" class="rounded-q3"><a href="#sodienthoai">Điện thoại</a></th>
                    <th scope="col" class="rounded-q4"><a href="#thudientu">Thư điện tử</a></th>
                </tr>    
            </thead>
            <tfoot>
                <tr>
                    <td colspan="4" class="rounded-foot-left">
                        <em>
                        </em>
                    </td>
                    <td class="rounded-foot-right" style="font-size: smaller;">
                    </td>
                </tr>
            </tfoot>
            <tbody>
                <?php foreach ($hosocanbos as $hoso) { ?>
                    <tr>
                        <td><a href="<?php echo JRoute::_('index.php?option=com_vast&view=chitietcanbo&id=' . $hoso->id); ?>"><?= $hoso->hoten ?></a></td>
                        <td><?= $hoso->ngaysinh ?></td>
                        <td><?= $hoso->nguyenquan ?></td>
                        <td><?= $hoso->dienthoai ?></td>
                        <td><?= $hoso->thudientu ?></td>
                    </tr>
                <?php } ?>
            </tbody>
        </table>
    </div>    
    <div style="float: left; width: 680px; margin-top: 5px;">
        <a style="left: 600px; position: relative;" href="<?php echo JRoute::_('index.php?option=com_vast&task=baocao.csvReport&nam=' . $nam . '&nu=' . $nu); ?>">
            <img src="<?php echo $this->baseurl . '/components/com_vast/assets/images/csv_text.png'; ?>" />
        </a>
        <a style="left: 610px; position: relative;" href="<?php echo JRoute::_('index.php?option=com_vast&task=baocao.excelReport'); ?>">
            <img src="<?php echo $this->baseurl . '/components/com_vast/assets/images/excel.png'; ?>" />                            
        </a>
        <a style="left: 620px; position: relative;" href="<?php echo JRoute::_('index.php?option=com_vast&task=baocao.pdfReport'); ?>">
            <img src="<?php echo $this->baseurl . '/components/com_vast/assets/images/filetype_pdf.png'; ?>" />                            
        </a>                    
    
    </div>        
    <div style="float: left; width: 680px; margin-top: 5px;">
        <?php
        $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
        echo '<a title="Quay lại" href="' . $url . '"><span style="left: 610px; position: relative;">&laquo; Quay lại</span></a>';
        ?>    
    </div>    
</div>